﻿#ifndef _WEAPONITEM_H_
#define _WEAPONITEM_H_
#include "ui/CocosGUI.h"
#include "cocos2d.h"
class WeaponItem : public cocos2d::ui::Widget {
public:
	WeaponItem(int index);
	~WeaponItem();
	static WeaponItem* create(int index);
	bool init();
	void setSelected(bool isSelect);//设置是否选中
	void addClickEventListener(const ccWidgetClickCallback& callback);
	void initSpriteFrameCache();
private:
	int index;
	cocos2d::SpriteFrameCache* gameSpriteCache;
	cocos2d::Node* rootNode;
	cocos2d::Sprite* selected;
	cocos2d::ui::Button* bgBtn;
};
#endif // !_WEAPONITEM_H_



